<?php
include "./functions.php";
session_start();
//没有找到类自动执行
function __autoload($className){
    if(substr($className,-10 ) == 'Controller'){
        include "./Controller/{$className}.php";
    }else{
        include "./Tool/{$className}.php";
    }
}

//控制器
$a = isset($_GET['a']) ? $_GET['a'] : 'view';
$a = "{$a}Controller";
$controller = new $a();
//方法
$c = isset($_GET['c']) ? $_GET['c'] : 'view';
$controller->$c();
















